﻿using System;
using Vega.USiteBuilder;

namespace Lu.Blog.Domain.Model.DocumentType
{
    [DocumentType(Name = "Author", IconUrl = "user.png", AllowedTemplates = new[] {"Author"})]
    public class Author : DocumentTypeBase
    {
        public Author()
        {
        }

        public Author(int nodeId) : base(nodeId)
        {
        }

        #region Author information

        [DocumentTypeProperty(UmbracoPropertyType.Textstring, Tab = "Author information", Name = "First name")]
        public string AuthorFirstName { get; set; }

        [DocumentTypeProperty(UmbracoPropertyType.Textstring, Tab = "Author information", Name = "Last name")]
        public string AuthorLastName { get; set; }

        //[DocumentTypeProperty(UmbracoPropertyType.Other, OtherTypeName = "AuthorImagePicker", Tab = "Author information", Name = "Avatar")]
        [DocumentTypeProperty(UmbracoPropertyType.MediaPicker, Tab = "Author information", Name = "Avatar")]
        public string ImageUrl { get; set; }

        [DocumentTypeProperty(UmbracoPropertyType.Textstring, Tab = "Author information", Name = "Username",
            Description = "Username is the name visible to everybody")]
        public string Username { get; set; }

        [DocumentTypeProperty(UmbracoPropertyType.DatePicker, Tab = "Author information", Name = "Birthdate")]
        public DateTime AuthorBirthdate { get; set; }

        [DocumentTypeProperty(UmbracoPropertyType.RichtextEditor, Tab = "Author information", Name = "About the author")]
        public string AuthorAboutText { get; set; }

        #endregion

        #region Author page settings

        [DocumentTypeProperty(UmbracoPropertyType.Textstring, Tab = "Author page settings", Name = "Author posts count")]
        public int AuthorPostCount { get; set; }

        #endregion
    }
}